<html>
<body>
<script>
function doClick() {
  var e = document.createEvent("MouseEvents");
  e.initMouseEvent("click", true, true, window,
      0, 0, 0, 0, 0, false, false, false, false, 0, null);
  var elem = document.getElementById("link");
  elem.dispatchEvent(e);
}
</script>
<a id="link" href="test.html" target="_blank">Test Link</a>
</body>
</html>
